
begintalkscript;

variables;

begintalknode 10;
	state = -1;
	nextstate = 10;
	question = "Karl";
	text1 = "The inkeeper here appears to be a confident man, and he calmly watches his patrons while polishing a glass. Satisfied with what he sees, he turns his attention to you.";
	text2 = "_Welcome to the Sunken Cow Inn, the only inn in all of Yris. The name's Karl. How can I help you?_";
	text5 = "Karl still dutifully mans the bar, waiting to take orders.";
	text6 = "_What'll it be, friends?_";
	action = INTRO;
	code = 
		set_flag(11,2,1);
	break;
begintalknode 11;
	state = 10;
	nextstate = -1;
	condition = get_flag(0,1) == 0;
	question = "What can I get here?";
	text1 = "_Well, we got some pretty good ale in stock, and some good travelin' rations. And of course, we've got a nice common room._";
	text2 = "He pauses for a minute, as if mentally calculating something.";
	text3 = "_Ten coins for a round of ale, and twenty for a night's rest. Food's pretty cheap, too. So, what'll it be?_";
	code = 
		set_flag(0,1,1);
	break;
begintalknode 12;
	state = 10;
	nextstate = -1;
	condition = get_flag(0,1) == 1;
	question = "A round of ale, if you'd be so kind. (10 coins)";
	text1 = "You hand over the coins, and Karl steps into the back room for a minute. He returns carrying an armful of glasses filled with ale.";
	text2 = "Surprisingly enough, it tastes fairly good.";
	text3 = "As soon as Karl realizes that you don't have enough money, his mood sours.";
	text4 = "_Look, friends. I can't give you free ale, so you might want to try somewhere else._";
	action = PAY -1 -1 0 10;
	code = 
		if(coins_amount() >= 10)
			set_party_status(28,15,1);
	break;
begintalknode 13;
	state = 10;
	nextstate = -1;
	condition = get_flag(0,1) == 1;
	question = "How about a room for the night? (20 coins)";
	text1 = "Karl takes your money and points you toward the common room. It's a bit dingy, but at least the bugs are friendly.";
	text2 = "Somehow, you manage to get a good amount of sleep.";
	text3 = "Karl's mood darkens once he realizes that you don't have the money.";
	text4 = "_Look, friends. Just make sure you're gone before last call, because you can't stay here unless you pay._";
	text5 = "Karl notices that you're on horseback. _Look, friend. I don't know where you got those horses from, and I don't know where they've been. They'll have to sleep elsewhere._";
	action = INN 20 15 10;

begintalknode 14;
	state = 10;
	nextstate = -1;
	condition = get_flag(0,1) == 1;
	question = "Let's see that food.";
	text1 = "Karl waits for you to finish poring over the menu, before returning to polishing the inn's glassware.";
	code = 
		begin_shop_mode("Sunken Cow Inn","Karl hands you a menu, which shows the inn's selection of food. Most of it looks fairly mundane, but Karl swears that the kebabs are delicious.",5,3,-1);
	break;
begintalknode 15;
	state = 10;
	nextstate = -1;
	condition = get_flag(0,2) == 0;
	question = "Why is this inn called the Sunken Cow?";
	text1 = "Karl grins, and pauses to think for a minute.";
	text2 = "_Well, it started when one of the local farmers' cows escaped and walked into the middle of town. The poor thing walked down to the docks and it got into a boat somehow._";
	text3 = "_As you'd expect, the boat started to sink, and the cow fell out and drowned. But the weird thing was, the cow's body never surfaced. I think we must have some nasty fish at the bottom of the lake..._";
	text4 = "He keeps rambling on about the lake, and you stop listening. You have a hard time believing any of it, anyway.";
	code = 
		set_flag(0,2,1);
	break;
begintalknode 16;
	state = 10;
	nextstate = 11;
	question = "What can you tell us about the area?";
	text1 = "_Well, Hektos is the only big town. Besides that, it's all farms and forest. But we do have an Empire fort here, off to the southwest. _";
	text2 = "_The most impressive things we've got here are the waterfalls off to the north, and the Pearl Bridge. Beyond that, Yris is pretty dull._";
	text3 = "_We fish, we mine a bit, and we farm. That's our lives in a nutshell._";
	text4 = "He pauses for a moment, then lowers his voice. _One more thing. I've heard that there might be some rebels hiding out in the area. But you didn't hear it from me, alright?_";

begintalknode 17;
	state = 11;
	nextstate = -1;
	question = "Could you tell us about the Empire fort? We've got a delivery to make.";
	text1 = "_It's called Fort Galima, and it's a pretty impressive piece of stonework. The soldiers there patrol this area as well as the surrounding forest._";
	text2 = "_I've been hearing some rumors about that place, though. Some off-duty soldiers came in here one day talking about some sort of experiment, but they didn't really say anything else._";
	text3 = "_Still, for the most part, they keep to themselves, and they don't cause any trouble in town._";

begintalknode 18;
	state = 11;
	nextstate = -1;
	question = "What's the Pearl Bridge?";
	text1 = "_Well, from what I heard, some crazy mage-turned-architect from Stonehurst decided to set up shop in Hektos a while back. He built an impressive bridge out of blue and white stone across the river up north, and then he died._";
	text2 = "Seeing your puzzled looks, Karl shrugs. _He was a bit of a loon. But he left us all a nice bridge._";

begintalknode 19;
	state = 11;
	nextstate = -1;
	question = "Anything interesting to say about Hektos?";
	text1 = "_Well, we don't have a lot here. Iracos and Miali have their forge, I've got the inn, and Will runs a training center. Then there's Mitch, who just kind of bums around the lake looking for good places to fish._";
	text2 = "_We usually get off-duty soldiers in here, since we're the town closest to Fort Galima, and we get the odd merchant who gets lost in the forest._";
	text3 = "_Oh yeah, and be nice to my dog, Spark. He's around here somewhere._";

begintalknode 20;
	state = 11;
	nextstate = -1;
	condition = get_flag(0,3) == 0;
	question = "Rebels? You can't be serious!";
	text1 = "_Shhh!!!_ Karl looks around nervously.";
	text2 = "_I can't talk about it, and I don't know anything anyway! So shut up before you get me killed!_";
	code = 
		set_flag(0,3,1);
	break;
begintalknode 25;
	state = -1;
	nextstate = 25;
	question = "Spark";
	text1 = "This cheerful-looking dog paces up to you and sniffs your foot. The tag on its collar reads _Spark_.";
	text2 = "It barks at you.";
	text5 = "Spark looks at you expectantly and barks.";
	action = INTRO;

begintalknode 26;
	state = 25;
	nextstate = -1;
	question = "(Pet the dog.)";
	text1 = "Spark jumps up and down happily. Then he walks away, apparently bored.";
	action = END_TALK;
	code = 
		if(get_flag(0,4) == 0)
			set_flag(0,4,1);
	break;
begintalknode 27;
	state = 25;
	nextstate = -1;
	question = "(Shoo the dog away.)";
	text1 = "Spark looks unhappy and walks away.";
	action = END_TALK;
	code = 
		if(get_flag(0,4) == 0)
			set_flag(0,4,2);
	break;
begintalknode 28;
	state = 25;
	nextstate = -1;
	condition = has_item(192) == 1;
	question = "(Hand the dog a bone.)";
	text1 = "Spark leaps around ecstatically before taking the bone from you.";
	text2 = "Honestly, you can't remember where you picked the thing up, so it's no surprise when Spark spits it out. He still looks quite happy, though.";
	action = END_TALK;
	code = 
		if(get_flag(0,4) == 0)
			set_flag(0,4,1);
	break;
begintalknode 30;
	state = -1;
	nextstate = 30;
	question = "Samuel";
	text1 = "This middle-aged soldier sits quietly at the bar, sipping a large flagon of something you can smell from ten feet away.";
	text2 = "You ask his name, and he grunts something that sounds like _Samuel._";
	text5 = "Samuel is still sitting at the bar, and he's still drinking.";
	action = INTRO;
	code = 
		set_flag(11,3,1);
	break;
begintalknode 31;
	state = 30;
	nextstate = -1;
	question = "Are you off duty?";
	text1 = "He grimaces at you.";
	text2 = "_What do you think? My commander would hack me in half if he saw me drinking this much!_";

begintalknode 32;
	state = 30;
	nextstate = 31;
	question = "Where are you from?";
	text1 = "_Me? I'm from outside of this middle-of-nowhere province. I got transferred here from the royal guard in Stonehurst after my captain decided he didn't like me._";
	text2 = "_And now, I sit in Fort Galima and rot. Except when I come down here, of course. Then I can drink the pain away._";

begintalknode 33;
	state = 31;
	nextstate = 32;
	question = "So I take it that you don't like being in the army?";
	text1 = "He stares at you, unsure whether or not you're serious.";
	text2 = "_I'm just waiting for the day I can waltz out of that fort and tell my commander what I've always wanted to tell him..._";

begintalknode 34;
	state = 32;
	nextstate = -1;
	question = "What do you want to tell him?";
	text1 = "The air flickers blue when Samuel speaks again.";
	text2 = "Clearly, he's more than a bit drunk. Very few Empire soldiers would want their commanding officer hearing something like that.";

begintalknode 36;
	state = 37;
	nextstate = -1;
	condition = get_flag(0,20) == 2;
	question = "The mayor told us to deliver this message.";
	text1 = "You repeat what the mayor told you, trying to get the right emphasis on everything. The official just sits there, his face impassive.";
	text2 = "_You see, this is just the kind of thing I'm here to talk with Mayor Anderson about. I'll just wait for him to call me in._";
	text3 = "He sits back in his chair, a lazy smile on his face. Either he's completely clueless, or he knows exactly what he's doing... you're not sure which.";
	action = END_TALK;
	code = 
		set_flag(0,20,3);
	break;
begintalknode 37;
	state = -1;
	nextstate = 37;
	question = "Official";
	text1 = "After making small talk with this man for a while, you learn that he's an Empire official sent here to aid the mayor in governing the town. You also learn that he's incredibly boring.";
	text2 = "You politely excuse yourself from the conversation before you're bored to tears.";
	text5 = "The official is still here, and he's still boring.";
	action = INTRO;
	code = 
		if(get_flag(0,20) == 0)
			set_flag(0,20,1);
	break;
begintalknode 38;
	state = -1;
	nextstate = -1;
	question = "Townswoman";
	text1 = "You make small talk with this woman for a while, but once you realize that she has nothing useful to say, you politely excuse yourself from the conversation.";

begintalknode 39;
	state = -1;
	nextstate = -1;
	question = "Townsman";
	text1 = "You make small talk with this man for a while, but once you realize that he has nothing useful to say, you politely excuse yourself from the conversation.";

begintalknode 40;
	state = -1;
	nextstate = 40;
	question = "Mitch";
	text1 = "At the edge of the lake, you find a young man wearing tattered robes and holding a fishing pole. A net lies at his feet, along with a few freshly caught fish. He seems fairly peaceful, and he speaks first.";
	text2 = "_Hey, folks. Try not to scare away the fish, if you'd be so kind. My name's Mitch, and I fish here._";
	text3 = "He sizes you up for a moment.";
	text4 = "_In fact, I just caught some big trout, if you're looking for food._";
	text5 = "Mitch is still here, with his fishing line peacefully bobbing in the lake.";
	text6 = "_What's going on, folks?_";
	action = INTRO;
	code = 
		set_flag(11,7,1);
	break;
begintalknode 41;
	state = 40;
	nextstate = -1;
	question = "How about those fish?";
	text1 = "Mitch lays out his most recent catch for you to peruse. They kind of smell.";
	text2 = "_Well, since you folks think I'm just a bum, I don't really see a reason to sell you any of my catch._";
	code = 
		clear_strings();
		if(get_flag(0,5) != 1) {
			add_string(1);
			begin_shop_mode("Mitch's Trout","Mitch has caught some impressive-looking trout, each of which looks like an adventurer-sized meal in itself. He's only got a few of them, though.",6,4,-1);
		}
		else
		add_string(2);
	break;
begintalknode 42;
	state = 40;
	nextstate = 41;
	question = "Are you always here?";
	text1 = "_Not always. I kind of wander around the lake, so I can fish the best spots. Anyway, town life never really suited me._";
	text2 = "He reels in the line and and casts again.";

begintalknode 43;
	state = 40;
	nextstate = -1;
	question = "Are the fish biting?";
	text1 = "_Not much. It's been a slow week, and I'll probably be moving on in a while._";
	text2 = "He looks up at the sky for a minute.";
	text3 = "_But it's a nice day, so I may stick around._";

begintalknode 44;
	state = 41;
	nextstate = 42;
	question = "So you don't really have a job?";
	text1 = "_Nope. Not really, in the conventional sense. I fish, and I sell the fish. But it's not a full-time thing, just enough for me to get by._";
	text2 = "_Some people in the town can't really respect that. Heck, some of them mistake me for a beggar. But I think my way of life works just fine for me._";
	text3 = "For a second, it looks like he's got a fish, but then he relaxes again and lets his line drift.";

begintalknode 45;
	state = 42;
	nextstate = -1;
	condition = get_flag(0,5) == 0;
	question = "You sound like a bum to me.";
	text1 = "For a moment he looks angry, but the look passes.";
	text2 = "_Well, you live your way, and I'll live mine. We'll see who's still here in ten years._";
	action = END_TALK;
	code = 
		set_flag(0,5,1);
	break;
begintalknode 46;
	state = 42;
	nextstate = -1;
	condition = get_flag(0,5) == 0;
	question = "Makes sense to me.";
	text1 = "_Then you, my friends, are enlightened individuals. Anyway, if you don't mind, I'd like to get back to fishing. Good luck in your travels._";
	text2 = "You leave the young man to his fishing.";
	action = END_TALK;
	code = 
		set_flag(0,5,2);
	break;
begintalknode 50;
	state = -1;
	nextstate = 50;
	question = "Miali";
	text1 = "This woman appears to have been in a forge recently. Or at least, that's what you assume from her mildly-singed hair. Despite this, she seems relatively calm, as if it happens on a regular basis.";
	text2 = "Something about her catches your eye, and soon you realize that it's the impressive-looking scars on her arms. They make her look a lot like an adventurer, in fact.";
	text3 = "_I see that you've noticed the scars,_ she suddenly says. _Got 'em fighting a drake. Interesting story, really._";
	text4 = "_Anyway, my name's Miali, and my husband Iracos and I run the town forge._";
	text5 = "Miali's still here, with bits of her hair quietly smoldering.";
	text6 = "_Anything else?_";
	action = INTRO;
	code = 
		set_flag(11,1,1);
	break;
begintalknode 51;
	state = 50;
	nextstate = -1;
	condition = get_flag(0,6) == 0;
	question = "What do you sell?";
	text1 = "_Well, I make armor, and my husband makes weapons,_ she says, nodding to the man seated at the other table.";
	text2 = "_We try to keep our wares practical, so we've field-tested a lot of them. By that, I mean that we send some stuff up to Fort Galima for them to work with._";
	code = 
		set_flag(0,6,1);
	break;
begintalknode 52;
	state = 50;
	nextstate = -1;
	condition = get_flag(0,6) == 1;
	question = "Can we see that armor?";
	text1 = "Miali finishes explaining the work she's done, and exactly how well each piece stands up to attacks. She does a fairly good job of it, too.";
	code = 
		if(get_flag(0,7) == 0)
			begin_shop_mode("Miali's Armor","Miali shows you some of the better armor she's made lately. She's also willing to buy any excess gear you have.",0,3,5);
		if(get_flag(0,7) == 2)
			begin_shop_mode("Miali's Armor","Miali shows you some of the better armor she's made lately. She's also willing to buy any excess gear you have.",0,2,4);
		if(get_flag(0,7) == 1)
			begin_shop_mode("Miali's Armor","Miali shows you some of the better armor she's made lately, but she's not willing to buy any extra gear from you. Perhaps you offended her.",0,4,-1);
	break;
begintalknode 53;
	state = 50;
	nextstate = 51;
	question = "How did you get those scars?";
	text1 = "She smiles, and pauses for a moment. _Well, it was back when I used to be an adventurer. I never really saw much action, what with this being a fairly quiet part of the continent, but one day somebody found a drake out in the forest._";
	text2 = "_Of course, I wasn't stupid enough to try adventuring alone. I traveled with a few people, including Iracos. And we thought it'd be a fairly quick job to get rid of the drake._";
	text3 = "_What we didn't think about was how fast those things move. Before we turned it into a charred pincushion, it managed to rush us, claw me and three others pretty badly, and try to charbroil us._";
	text4 = "_That pretty much ended my adventuring days. Iracos and I called it quits, and we settled down here. We share a house with some farmers up along the edges of the woods._";

begintalknode 54;
	state = 51;
	nextstate = -1;
	condition = get_flag(0,7) == 0;
	question = "So you couldn't beat a drake without getting hurt? You're kidding!";
	text1 = "Miali looks rather angry. _Well, I doubt you could do better than we did. Not like you could even try... that thing's long gone._";
	code = 
		set_flag(0,7,1);
	break;
begintalknode 55;
	state = 51;
	nextstate = -1;
	condition = get_flag(0,7) == 0;
	question = "Sounds like it was pretty rough.";
	text1 = "_Yep, it was. Glad to see you can appreciate that._";
	text2 = "_Anyway, that's behind me now. Now, I just have to avoid burns from the forge._";
	code = 
		set_flag(0,7,2);
	break;
begintalknode 56;
	state = 50;
	nextstate = -1;
	question = "Anything interesting going on in town?";
	text1 = "_Hm... not much, really. This town is just like that._";
	text2 = "She stops and thinks for a minute.";
	text3 = "_Well, Mitch is in town, and that means good, cheap trout. But that's about it._";

begintalknode 57;
	state = 50;
	nextstate = -1;
	condition = get_flag(0,8) == 0;
	question = "Where's the forge?";
	text1 = "_Downstairs,_ she says, pointing toward the trapdoor in the corner of the room.";
	text2 = "_Please don't go down there. Iracos and I hate it when people disturb our work._";
	code = 
		set_flag(0,8,1);
	break;
begintalknode 60;
	state = -1;
	nextstate = 60;
	question = "Iracos";
	text1 = "The first thing you notice about this man is the scorched pair of gloves he's wearing, which suggest that he's been working at the forge recently. The second thing you notice is the beautifully-crafted pike he's polishing.";
	text2 = "Once he notices you, he sets down the polearm. _Greetings, adventurers. The name's Iracos, and I sell weapons. That includes this wonderful piece of work, which I just finished._";
	text5 = "Iracos relaxes in his chair, gazing out the windows for a moment.";
	text6 = "_Anything else I can get you?_";
	action = INTRO;
	code = 
		set_flag(11,5,1);
	break;
begintalknode 61;
	state = 60;
	nextstate = -1;
	condition = get_flag(0,6) == 0;
	question = "What do you do here?";
	text1 = "_Well, Miali and I run the forge here, and we make most of the metal goods the farms around here need. In addition to that, I make weapons, and she makes armor._";
	code = 
		set_flag(0,6,1);
	break;
begintalknode 62;
	state = 60;
	nextstate = -1;
	condition = get_flag(0,8) == 0;
	question = "So, where's the forge?";
	text1 = "_It's downstairs, through the trapdoor in the corner. Don't go down there, if you'd be so kind._";
	code = 
		set_flag(0,8,1);
	break;
begintalknode 63;
	state = 60;
	nextstate = 61;
	question = "Anything interesting going on in town?";
	text1 = "Iracos has to stop and think for a moment.";
	text2 = "_Hm... nothing much, honestly. This is a pretty quiet province. The most excitement we get is typically around harvest time._";
	text3 = "_It's peaceful, and I like that about it. Though I do kind of miss my old adventuring days..._";

begintalknode 64;
	state = 61;
	nextstate = 62;
	question = "You used to be an adventurer?";
	text1 = "_Yep,_ he says, grinning broadly. _Before Miali and I got married, we traveled with a group of adventurers. We didn't do much, but that was just because very few monsters ever saw our chunk of the mountains as worthwhile._";
	text2 = "_Worst we ever saw was a drake, and that nearly tore us up before we could slay it. Quite the mean-tempered bastard, if I recall. That's how these gloves got so badly scorched, in fact._";
	text3 = "_I miss being able to just wander around and kill stuff. Life was a bit simpler back then._";

begintalknode 65;
	state = 62;
	nextstate = 60;
	question = "Well, would you like to travel with us?";
	text1 = "Iracos starts laughing hysterically, and it takes him a while to catch his breath again.";
	text2 = "_You've got to be kidding me! And give this up? I've got a wonderful wife, a steady job and a peaceful life!_";
	text3 = "_As much as I loved adventuring, I've got too much to lose now. I can't be getting shot and charged at on a regular basis now!_";
	text4 = "He chuckles a bit. _Actually, you're not the first to try and get me to take up the sword again. Some crazy soldier was in here a week ago trying to get me up and killing again._";
	text5 = "_Needless to say, I told him off. I told him Miali would hunt me down and drag me back here._";

begintalknode 66;
	state = 62;
	nextstate = 60;
	question = "Yeah, that's never going to get old.";
	text1 = "_Enjoy it while you can, because it's only a matter of time until you die, get injured too badly to keep fighting, or just want to settle down. Trust me on that one._";

begintalknode 67;
	state = 60;
	nextstate = -1;
	condition = get_flag(0,6) == 1;
	question = "What do you have for sale?";
	text1 = "Iracos shows you the weapons he's made recently, carefully detailing each item's virtues.";
	code = 
		if(get_flag(0,7) == 0)
			begin_shop_mode("Iracos's Weapons","Iracos carries a fairly decent selection of deadly-looking weapons. He's also willing to buy any excess gear you have.",1,3,5);
		if(get_flag(0,7) == 2)
			begin_shop_mode("Iracos's Weapons","Iracos carries a fairly decent selection of deadly-looking weapons. He's also willing to buy any excess gear you have.",1,2,4);
		if(get_flag(0,7) == 1)
			begin_shop_mode("Iracos's Weapons","Iracos carries a fairly decent selection of deadly-looking weapons. However, he doesn't seem to like you very much. Maybe it was something you said.",1,4,-1);
	break;
begintalknode 70;
	state = -1;
	nextstate = 70;
	question = "Will";
	text1 = "You can tell that this man makes a practice of looking nondescript. It would work, were it not for the huge halberd strapped to his back. Beyond that, his only distinguishing feature is an odd-looking leather helmet.";
	text2 = "Right now, this man is nervously pacing around the room, stopping to look out the window every once and a while.";
	text3 = "_Greetings. My name is Will, and I train people. Particularly adventurers._";
	text5 = "Will is still here, nervously pacing back and forth across the room.";
	text6 = "_Yes?_";
	action = INTRO;
	code = 
		set_flag(11,6,1);
	break;
begintalknode 71;
	state = 70;
	nextstate = -1;
	condition = get_flag(0,9) == 0;
	question = "You look nervous. Is something wrong?";
	text1 = "_No, I'm just waiting for news from someone. Not sure whether or not something is going to happen. Nothing important, though..._";
	text2 = "A twig cracks outside, and Will barely stifles a yelp. It's patently obvious that something important is wrong, but he won't tell you.";
	code = 
		set_flag(0,9,1);
	break;
begintalknode 72;
	state = 70;
	nextstate = -1;
	condition = get_flag(0,10) == 0;
	question = "What do you train people in?";
	text1 = "_Mostly I deal with combat training, so I usually have a few soldiers in here trying to improve their skills. But I also deal with hunting a bit, like tracking and such._";
	text2 = "_Nothing else that would interest an adventurer, I imagine._";
	code = 
		set_flag(0,10,1);
	break;
begintalknode 73;
	state = 70;
	nextstate = -1;
	condition = get_flag(0,10) == 1;
	question = "Can you train us?";
	text1 = "Will finishes explaining his techniques, then resumes his nervous pacing.";
	code = 
		begin_shop_mode("Will's Training","Will agrees to train you in light combat skills. He doesn't seem to have a very strong command of his material, and he charges a lot, but it appears that you could still learn something from him.",7,5,-1);
	break;
begintalknode 74;
	state = 70;
	nextstate = 71;
	question = "Has anything interesting happened around here lately?";
	text1 = "_No. Nothing at all. It's been really, really quiet, and I can't take much more of it!_";
	text2 = "He starts to pace faster.";

begintalknode 75;
	state = 71;
	nextstate = 72;
	question = "So you don't like living here, then?";
	text1 = "_No, don't get me wrong, I love it here. Really... really, what's the word? Tranquil, that's it. I just want something to happen!_";

begintalknode 76;
	state = 72;
	nextstate = -1;
	question = "Anything in particular?";
	text1 = "_God, no. Of course not!_ His pacing is getting frantic now.";
	text2 = "_Even if I was, I wouldn't tell you! I barely even know you! So unless you've got something important to tell me, please stop wasting my time!_";
	text3 = "You decide to leave the man alone before he gets jumpy enough to pull out the halberd.";
	action = END_TALK;

begintalknode 80;
	state = -1;
	nextstate = 80;
	question = "Mayor Anderson";
	text1 = "This aging man wears a traditional mayor's sash, and looks as if he'd like nothing better than to run from the room screaming. But then, looking at the piles and racks of paper which fill the room, you can't quite blame him.";
	text2 = "He wearily looks up at you, barely noticing your presence through the haze of paperwork. Even when he greets you, his hand keeps writing.";
	text3 = "_Welcome to Hektos, adventurers. I am the mayor of this town, and governor of this province. What brings you barging into my office?_";
	text5 = "Mayor Anderson continues writing out letters, almost oblivious to your presence.";
	action = INTRO;
	code = 
		set_flag(11,9,1);
	break;
begintalknode 81;
	state = 80;
	nextstate = 81;
	question = "You run this town and the province?";
	text1 = "He sighs and wearily sets down his pen.";
	text2 = "_Regrettably, yes. Or rather, I do the Empire's paperwork, which amounts to this room of paper and a room downstairs. I coordinate imports, exports, and taxes, and I correspond with the millions of Empire bureaucrats who seem to hate me._";
	text3 = "_I hate this job. The Empire is constantly telling me how to rule this area, and it's even worse since we have Fort Galima nearby. I have twenty years of political experience, and the Empire insists upon treating me like a child!_";
	text4 = "_Hell, this place pretty much runs itself. I just have to make it look official for the Empire._";

begintalknode 82;
	state = 80;
	nextstate = -1;
	condition = get_flag(0,11) == 0;
	question = "Are you okay? You look tired.";
	text1 = "_No, I'm not okay. I'm going to die of paperwork overdoses. And worse yet, the Empire wants me to retire so they can put a young, aspiring, easily-manipulated bureaucrat in charge of the province._";
	text2 = "_Simply put, I love this area too much to let the Empire strangle it to death with bureaucracy. So I'm stuck with this job until either the Empire crumbles or they decide to leave me the hell alone!_";
	text3 = "He sighs. _In short, I'm stuck in this office until I die, and even then my struggle will have been in vain._";
	code = 
		set_flag(0,11,1);
	break;
begintalknode 83;
	state = 80;
	nextstate = -1;
	question = "Any quests you need taken care of?";
	text1 = "_Hah. Not unless you can single-handedly remove the Empire from power. Or do a lot of paperwork for me._";
	text2 = "_Or, even better, you could find these rebels I've heard so much about and get rid of them. Hell, get them AND the Empire out, and I'll give you a goddamn medal!_";
	text3 = "He laughs bitterly for a moment, then turns serious again. _As long as I run this province, I will keep the peace, so I won't be needing your services._";
	code = 
		if(get_flag(0,12) == 0)
			remove_string(2);
	break;
begintalknode 84;
	state = 81;
	nextstate = -1;
	question = "You really think the Empire is out to get you?";
	text1 = "_Of course they are! They want this province for purely military purposes, just because Fort Galima is here. So, since I don't want to let them have it yet, they try to drive me crazy._";
	text2 = "He gets himself under control, perhaps realizing how much trouble his words could cause him.";
	text3 = "_Look, just leave me to my paperwork. I'll fight the battle their way, and maybe one day they'll let me run this valley the way it deserves to be run._";
	action = END_TALK;
	code = 
		set_flag(0,21,1);
	break;
begintalknode 85;
	state = 81;
	nextstate = -1;
	question = "Why hasn't the Empire just imprisoned you yet?";
	text1 = "_Because I'm useful. I know this area, and my experience keeps things in order. However, they want someone in charge who they can control easier, but until then, they're fine torturing me with paperwork._";
	text2 = "_Of course, if they ever knew exactly how I feel about them, I'd probably be killed in the night. Almost makes me wish Avernum was still a prison... I'd prefer exile to death._";

begintalknode 86;
	state = 81;
	nextstate = 82;
	question = "Is running the province difficult?";
	text1 = "_No, not really. I speak with merchants entering the area, I sort out the odd legal dispute, and I deal with the simple minds running Fort Galima._";
	text2 = "_My one concern is the fact that I've heard some disconcerting rumors lately. Supposedly, there is a small cell of rebels operating somewhere in the area, and you can guess how happy I am about that... another group trying to take my province away._";
	text3 = "He shudders, then returns to his paperwork.";
	text4 = "_So for the moment, it's easy. But if these rumors are true, I'm going to kill myself._";

begintalknode 87;
	state = 82;
	nextstate = 80;
	condition = get_flag(0,12) == 0;
	question = "Rebels? You're kidding!";
	text1 = "_Why would I kid about something like that? It's a rumor now, but it's only a matter of time until someone moves in to make the rumor true! And of course, the rumor might actually be true, in which case I hate my life._";
	text2 = "_God... it never ends. One day, I'll be free of these idiots who want to steal this land from us..._";
	text3 = "Hm... it appears that what Karl told you may be true.";
	code = 
		set_flag(0,12,1);
		if(get_flag(0,3) == 0)
			remove_string(3);
	break;
begintalknode 88;
	state = 82;
	nextstate = -1;
	question = "Well, good luck.";
	text1 = "He laughs, though half-heartedly.";
	text2 = "_Thank you. I think I shall need it._";
	text3 = "He resumes his paperwork, and you decide to leave him alone.";
	action = END_TALK;

begintalknode 89;
	state = 80;
	nextstate = -1;
	question = "Any advice for traveling in this province?";
	text1 = "You tell him about the delivery you need to make. He chuckles.";
	text2 = "_Ah, so you're running an errand for those fools in the fort? Here's my advice: go deliver your box, then get out of this province. Save me a headache and don't cause trouble._";
	text3 = "_I assure you, there is nothing here for you, unless you can set aside the violent tendencies which seem to plague adventurers._";

begintalknode 90;
	state = 80;
	nextstate = -1;
	condition = get_flag(0,20) == 1;
	question = "You know, there's somebody outside from the Empire. He wants to talk to you.";
	text1 = "Mayor Anderson stiffens for a moment, his eyes narrowing. _I'm aware of that, and I'm going to deal with him when I feel like it._";
	text2 = "He laughs bitterly. _In fact, tell him this: I'll accept the Empire's 'help' when I'm six feet under, and that he can take that message straight to Blackcrag. And if he comes in here, I'll personally shove the message right down his throat._";
	action = END_TALK;
	code = 
		set_flag(0,20,2);
	break;
